import Vue from 'vue'
import Router from 'vue-router'
import index from '@/components/index'
import article from '@/components/article'
import articleadd from '@/components/articleadd'
import a4 from '@/components/a4'
import a1 from '@/components/a1'
import newsDetail from "@/components/newsDetail";
import newsInfo from '@/components/newsInfo'
import shopInfo from '@/components/shopInfo'
import orderInfo from '@/components/orderInfo'
import login from '@/components/login'
import pay from '@/components/pay'
import order from '@/components/order'

import business from '@/components/business'
import question from '@/components/question'

import studygroup from '@/components/studygroup'
import {id} from "html-webpack-plugin/lib/chunksorter";
import articleinfo from '@/components/articleinfo'


import education from '@/components/education'
import education_info from '@/components/education_info'
import question_day from '@/components/question_day'

const routerPush = Router.prototype.push
Router.prototype.push = function push(location) {
  return routerPush.call(this, location).catch(error => error)
}
Vue.use(Router)
export default new Router({
  routes: [
    {
      path: '/index',
      name: 'index',
      component: index
    },
    {
      path: "/a4",
      name: 'a4',
      component: a4
    },
    {
      path: '/newsDetail/',
      name: 'newsDetail',
      component: newsDetail
    },
    {
      path: "/business",
      name: 'business',
      component: business
    },
    {
      path: '/question',
      name: 'question',
      component: question
    },
    {
      path: '/article',
      name: 'article',
      component: article
    },
    {
      path: '/articleadd',
      name: 'articleadd',
      component: articleadd
    },
    {
      path: '/a1',
      name: 'a1',
      component: a1
    },
    {
      path: '/newsInfo',
      name: 'newsInfo',
      component: newsInfo
    },
    {
      path: '/shopInfo',
      name: 'shopInfo',
      component: shopInfo
    },{
      path: '/orderInfo',
      name: 'orderInfo',
      component: orderInfo
    },{
      path: '/',
      name: 'login',
      component: login
    },{
      path: '/pay',
      name: 'pay',
      component: pay
    },{
      path: '/order',
      name: 'order',
      component: order
    }, {
      path: '/studygroup/:stu/:id',
      name: 'studygroup',
      component: studygroup
    },
    {
      path: '/articleinfo/:id',
      name: 'articleinfo',
      component: articleinfo
    },
    {
      path: '/education',
      name: 'education',
      component: education
    },
    {
      path: '/education_info',
      name: 'education_info',
      component: education_info
    },
    {
      path: '/question_day',
      name: 'question_day',
      component: question_day

    }
  ]
})
